package com.flca.frw.dao;

import java.util.Map;


public interface RegisterDatabase {

	/**
	 * return the persistence implementation type that is supported
	 * @return
	 */
	PersistenceType getPersistenceType();
	
	/**
	 * This is name that is used for both the (unique) code inside the pool and in persistence.xml
	 * @return
	 */
	String getUnitName();
	
	String getUsername();
	String getPassword();
	
	/**
	 * the fully qualified classname of the dbs driver
	 * @return
	 */
	Class<?> getDriver();
	
	/**
	 * The dbs url
	 * @return
	 */
	String getUrl();
	
	/**
	 * Only needed for Jpa types
	 * @return
	 */
	Class<?> getDialect();
	
	/**
	 * options that depends on the persistencetype
	 * @return
	 */
	Map<String, String> getOptions(); 
	
	/**
	 * if not null this query will be used to test before returning connection
	 * @return
	 */
	String getTestQuery();
	
	/**
	 * return the persistence specific factory that builds the specific Dao implementation
	 * @return
	 */
	DaoFactory getDaoFactory();
	
}
